package cn.tedu._07weibo.pojo.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Pattern;
import lombok.Data;

@Data
public class UserAddParam {
    @Pattern(regexp = "^(?=.{4,12}$)(?!.*(.)\\1{2,}).*$",
            message = "用户名4-12位，不允许出现3个及以上连续相同字符")
    @Schema(description = "用户名", required = true)
    private String username;
    @Schema(description = "密码", required = true)
    private String password;
    @Schema(description = "用户昵称",required = true)
    private String nickname;
}
